#include "subs.h"

/*
Direction Type Address       Text              
--------- ---- -------       ----              
Down      p    sub_EA7260+4B call    sub_EA7200
*/


int sub00007200 ( void )
{	/* TODO:
		Detour Those
	*/
	//int ( *sub0006828D ) ( LPCWSTR lpFileName ) = ( int ( __cdecl* ) ( LPCWSTR ) )( __BaseAddress + 0x6828D );
	WORD ( *sub0001EB50) ( int a1 ) = ( WORD ( __cdecl* ) ( int ) )( __BaseAddress + 0x1EB50 );
	LPWSTR lpPathName = *(LPWSTR*)( __BaseAddress + 0x000A69FC );
	
	log ( "[sub00007200] Detour." );

  signed int result; // eax@3


	sub0003B9B0 ( L"mrt", 0, lpPathName );

  if ( *lpPathName && ( sub0006828D ( lpPathName ), CreateDirectoryW ( lpPathName, 0 ) ) )
  {//6828D
    sub0001EB50 ( (int)lpPathName );//1EB50
    result = 0;
  }
  else
  {
    result = 103;
  }
  return result;
}